# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: PedsXing <pedsxing at gmx dot net>

pkgname=vc
pkgver=1.4.3
pkgrel=1
pkgdesc='A library to ease explicit vectorization of C++ code'
url='https://github.com/VcDevel/Vc'
arch=(x86_64)
license=(LGPL3)
makedepends=(cmake)
source=(https://github.com/VcDevel/Vc/releases/download/$pkgver/Vc-$pkgver.tar.gz)
sha256sums=('988ea0053f3fbf17544ca776a2749c097b3139089408b0286fa4e9e8513e037f')

build() {
  cmake -B build -S Vc-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects" \
    -DTARGET_ARCHITECTURE=generic
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
